home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / cdcom.zip / PROTOCOL.BAT < prev    next >
DOS Batch File  |  1992-04-18  |  4KB  |  138 lines

  1. echo off
  2. set dszlog=dsz%9.log
  3.  
  4. if %1 == Zmodem goto Zmodem
  5. if %1 == Wxmodem goto Wxmodem
  6. if %1 == Ymodem goto Ymodem
  7. if %1 == Ymodem-Batch goto Ymodem-Batch
  8. if %1 == Xmodem goto Xmodem
  9. if %1 == Sealink goto Sealink
  10. if %1 == Megalink goto Megalink
  11. if %1 == Kermit goto Kermit
  12. if %1 == K9Xmodem goto k9Xmodem
  13. if %1 == Jmodem goto Jmodem
  14. if %1 == Super8K goto Super8K
  15. if %1 == Lynx goto Lynx
  16. if %1 == Puma goto Puma
  17. if %1 == MobyTurbo goto MobyTurbo
  18. if %1 == Pkzip goto Pkzip
  19. if %1 == Viewfile goto Viewfile
  20. goto end
  21.  
  22. rem      to add other protocols just follow these examples
  23. rem      the % sign tells dos that this is a dos variable
  24.  
  25. rem %1 = protocol name, make sure it is exact match as what is in the
  26. rem      protocol.def file so the %1 == matches up (it is case sensitive also)
  27. rem %2 = port number (1, 2, 3, 4)
  28. rem %3 = baud rate. true connect rate baud, not locked baud, as reported
  29. rem      by callinfo.bbs line 2
  30. rem %4 = filename being passed to transfer.  This will also contain the
  31. rem      path to the file.  For batch, @drive:\path\batch#.dsz is passed
  32. rem      ex: @c:\cdcom\batch#.dsz, where # is node number if there is one.
  33. rem      remember a list of filenames will be passed if it is a batch
  34. rem      transfer, and dsz allows this
  35. rem %5 = port rate.  This will be the locked rate if port is locked.  This
  36. rem      is from callinfo.bbs line 31.
  37. rem %6 = node number, as reported by callinfo.bbs line 35.  I'm passing
  38. rem      it just in case you might need it.
  39.  
  40. :Zmodem
  41. dsz port %2 sz %4
  42. rem for 9600 systems use next line instead, and rem out above line
  43. rem dsz port %2 ha on sz %4
  44. goto end
  45.  
  46. :MobyTurbo
  47. dsz port %2 sz -m %4
  48. rem for 9600 systems use next line instead, and rem out above line
  49. rem dsz port %2 ha on sz -m %4
  50. goto end
  51.  
  52. :Xmodem
  53. dsz port %2 sx %4
  54. goto end
  55.  
  56. :Ymodem
  57. dsz port %2 sx -k %4
  58. goto end
  59.  
  60. :Ymodem-Batch
  61. dsz port %2 sb -k %4
  62. rem for 9600 systems use next line instead, and rem out above line
  63. rem dsz port %2 ha on sb -k %4
  64. goto end
  65.  
  66. :Ymodem-G
  67. rem Note that you must register DSZ for Ymodem-G to work
  68. dsz port %2 sb -g %4
  69. rem for 9600 systems use next line instead, and rem out above line
  70. rem dsz port %2 ha on sb -g %4
  71. goto end
  72.  
  73. rem ***  end of DSZ supported protocols  ***
  74.  
  75. rem ***  this next section is for viewing of files ***
  76.  
  77. :Viewfile
  78. rem this is configured to use AViewCom
  79. rem the dos variables are changed when viewing files.  here is what
  80. rem they are:
  81. rem %2 is the full filename with path
  82. rem %3 is comport (COM1, COM2, etc or LOCAL)
  83. rem %4 is time left online, as calculated from program
  84. rem %5 is ansi on=1, off=0 or choose=2 (program passes 0 or 1 however)
  85. rem %6 is the path to temp dir, given by line 2 cdcom.def for pcsig version
  86. rem    of door, or line 9 for the general version
  87. rem %7 is the extractor to use (see aviewcom docs)
  88. rem %8 is the connect baudrate (for calculating file xfer times) or -d
  89. rem %9 is the node number (from callinfo.bbs line 35)
  90. rem if you add a -d to the command line then downloading within
  91. rem aviewcom will be disabled.
  92. rem I recommend using the next line, as it works correctly
  93. aviewcom %2 %3 -t%4 -a%5 -p%6 -e%7 %8
  94. rem next line locks downloads
  95. rem aviewcom %2 %3 -t%4 -a%5 -p%6 -e%7 -d
  96. goto end
  97.  
  98. rem ** other protocols follow
  99.  
  100. :Kermit
  101. kermit send %4
  102. goto end
  103.  
  104. :Megalink
  105. mlink16 port %2 sm %4
  106. goto end
  107.  
  108. :K9Xmodem
  109. superk p%2 s%3 tk ds f%4
  110. goto end
  111.  
  112. :Jmodem
  113. jmodem s%2 %4
  114. goto end
  115.  
  116. :Sealink
  117. clink /p%2 t %4
  118. goto end
  119.  
  120. :Super8K
  121. superk p%2 s%3 ts ds f%4
  122. goto end
  123.  
  124. :Wxmodem
  125. superk p%2 s%3 tw ds f%4
  126. goto end
  127.  
  128. :Lynx
  129. lynx s %4
  130. goto end
  131.  
  132. :Puma
  133. puma s %4
  134. goto end
  135.  
  136.  
  137. :end
  138.